package com.hnuit.dao;

import com.hnuit.entity.User;

public class UserDaoImpl implements UserDao {
    //声明user对象
    private User user;

    //get和set方法
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
    @Override
    public void sayHi() {
        System.out.println("欢迎你" + user.getUsername());
    }
    @Override
    public boolean login(User user) {
        if ("zhangsan".equals(user.getUsername()) && "123456".equals(user.getPwd()))
            return true;
        else
            return false;
    }
}
